package com.chushouya.controller.order.admin;

import com.chushouya.common.constant.ServiceType;
import com.chushouya.order.dto.admin.order.OrderQuery;
import com.chushouya.order.service.admin.OrderExportService;
import com.general.framework.core.enums.BusinessType;
import com.general.framework.web.annotations.Log;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;


@Slf4j
@Api(tags = ServiceType.PLATFORM + "平台订单导出管理")
@RestController
@RequestMapping(ServiceType.PLATFORM + "/orderExport")
public class OrderExportController {

    @Resource
    private OrderExportService orderExportService;

    @ApiOperation("导出订单接口")
    @GetMapping("/export")
    @Log(businessType = BusinessType.EXPORT)
    public void excel(HttpServletResponse response, OrderQuery query) {
        query.setPage(1);
        query.setSize(100000);
        orderExportService.exportOrderPageResult(response, query);
    }
//
//    @ApiOperation("导出库存订单接口")
//    @GetMapping("/excelStockOrder")
//    @Log(businessType = BusinessType.EXPORT)
//    public void excelStockOrder(HttpServletResponse response, OrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        orderExportService.exportStockOrderPageResult(response,query);
//    }
//
//    @ApiOperation("导出收成订单跟进列表")
//    @GetMapping("/excelCompleteFollowOrder")
//    @Log(businessType = BusinessType.EXPORT)
//    public void excelCompleteFollowOrder(HttpServletResponse response, CompleteFollowOrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        orderExportService.excelCompleteFollowOrder(response, query);
//    }
//
//    @ApiOperation("导出合作商订单接口")
//    @GetMapping("/partnerExcel")
//    @Log(businessType = BusinessType.EXPORT)
//    public void partnerExcel(HttpServletResponse response, OrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        query.setPartnerTypeList(Lists.asList(PartnerTypeEnum.partner.value(), PartnerTypeEnum.franchisee.value()));
//        orderExportService.exportPartnerOrderPageResult(response, query);
//    }
//
//    @ApiOperation("导出移动门店订单")
//    @GetMapping("/excelCmccOrder")
//    @Log(businessType = BusinessType.EXPORT)
//    public void excelCmccOrder(HttpServletResponse response, OrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        orderExportService.exportCmccOrder(response, query);
//    }
//
//    @ApiOperation("导出门店订单")
//    @GetMapping("/excelStoreOrder")
//    @Log(businessType = BusinessType.EXPORT)
//    public void excelStoreOrder(HttpServletResponse response, OrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        orderExportService.exportStoreOrder(response, query);
//    }
//
//
//    @ApiOperation("导出运营订单接口")
//    @GetMapping("/excelOperatorOrder")
//    @Log(businessType = BusinessType.EXPORT)
//    public void excelOperatorOrder(HttpServletResponse response, OperatorOrderQuery query) {
//        query.setPage(1);
//        query.setSize(100000);
//        orderExportService.excelOperatorOrder(response, query);
//    }


}
